import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/assets/plugins/element'

Vue.config.productionTip = false

// 时间格式化
Vue.prototype.$toDate = toDateFun

function toDateFun(arg) {
  var dateee = new Date(arg).toJSON()

  var date = new Date(+new Date(dateee) + 8 * 3600 * 1000)
    .toISOString()
    .replace(/T/g, ' ')
    .replace(/\.[\d]{3}Z/, '')

  return date
}

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app')
